Skip to content

Add netlify.toml (build, SPA routing, security headers, prod env) - #9

Merged
amrtgaber merged 1 commit into
mainfrom
chore/netlify-config
Jun 16, 2026
Merged

Add netlify.toml (build, SPA routing, security headers, prod env)#9
amrtgaber merged 1 commit into
mainfrom
chore/netlify-config

Conversation

@amrtgaber

Copy link
Copy Markdown
Contributor

Codifies the Netlify config in-repo rather than the dashboard:

  • Build: pnpm builddist, Node 24 / pnpm 10
  • Prod env (non-secret): VITE_API_URL, VITE_GHOST_URL. The Ghost Content API key stays a Netlify environment variable (not committed).
  • SPA fallback: /* → /index.html 200, consolidated from public/_redirects (removed — single source of truth).
  • Security headers: X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, HSTS.

Merging triggers a production rebuild with these settings.

Codify Netlify config in-repo instead of the dashboard:
- pnpm build / publish dist, Node 24 / pnpm 10
- production VITE_API_URL + VITE_GHOST_URL (non-secret); Ghost Content key stays a Netlify env var
- SPA fallback redirect (consolidated from public/_redirects, now removed)
- baseline security headers (X-Frame-Options, nosniff, Referrer-Policy, Permissions-Policy, HSTS)
@netlify

netlify Bot commented Jun 14, 2026

Copy link
Copy Markdown

Deploy Preview for treepolitics-web ready!

Name Link
🔨 Latest commit fe864f2
🔍 Latest deploy log https://app.netlify.com/projects/treepolitics-web/deploys/6a2f06b96e58290008d7904a
😎 Deploy Preview https://deploy-preview-9--treepolitics-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@amrtgaber
amrtgaber merged commit e961dfb into main Jun 16, 2026
6 checks passed
@amrtgaber
amrtgaber deleted the chore/netlify-config branch June 16, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant